﻿using System.Collections.Generic;

namespace ITTestingSystem.BusinessLogic.DataServices.Abstract
{
    /// <summary>
    /// 
    /// </summary>
    /// 
    /// <typeparam name="T">
    /// 
    /// </typeparam>
    /// 
    public interface IBaseService<T> where T : class
    {
        /// <summary>
        /// 
        /// </summary>
        /// 
        void Add(T item);

        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <returns>
        /// 
        /// </returns>
        /// 
        IEnumerable<T> GetAll();

        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="id">
        /// 
        /// </param>
        /// 
        /// <returns>
        /// 
        /// </returns>
        /// 
        T GetById(int id);

        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="item">
        /// 
        /// </param>
        /// 
        void Update(T item);

        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="id">
        /// 
        /// </param>
        /// 
        void DeleteById(int id);

        /// <summary>
        /// 
        /// </summary>
        /// 
        /// <param name="item">
        /// 
        /// </param>
        /// 
        void Delete(T item);
    }
}
